# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=teardown
pkgver=1.0
pkgrel=2
pkgdesc='Command line tool to send a BYE request to tear down a call.'
url='http://www.hackingexposedvoip.com/'
groups=('blackarch' 'blackarch-voip')
license=('GPL')
arch=('x86_64' 'aarch64')
depends=('libnet')
makedepends=('gcc' 'make')
source=('http://www.hackingexposedvoip.com/tools/$pkgname.tar.gz'
        'http://www.hackingexposedvoip.com/tools/hack_library.tar.gz')
sha512sums=('63853574d7de44383a3d2fa0d62c92cf6e2277f40bc260b80482de2c91f56123e60f321cb65a6630a3798f6a7e796b3270604ee837ad18fb0fe00282d619229e'
            'bce70cbfd097b83d466bc7559261e2ccf10479820de8d15db65132369fa919a7805ed585a68fef16a358246a1bc8bcf02011928abbe04aaf9e4b973a47c45dce')

package() {
  cd hack_library

  sed -i "s:gcc :gcc $CFLAGS :" Makefile
  make

  cd "$srcdir/$pkgname"

  sed -i "s:gcc :gcc $CFLAGS :" Makefile
  make

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
}

